package com.twu.biblioteca.ui.recevier;

import java.util.Scanner;

public class IntegerRecevier {
    private final Scanner scanner;

    public IntegerRecevier(Scanner scanner) {
        this.scanner = scanner;
    }

    public int getInteger() {
        try {
            return scanner.nextInt();
        } catch (Exception ex) {
            return 0;
        }
    }
}
